<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/10/17 0017
 * Time: 14:49
 */

namespace Cuke\Http\Router;

use Phalcon\Mvc\Router\Group as RouterGroup;

/**
 * 接口分组路由
 * @package Cuke\Http\Router
 */
class GroupRoutes extends RouterGroup
{
    public function initialize()
    {
        $this->setPaths(['controller'=>'Group','namespace'=>'Cuke\\Controllers']);
        $this->setPrefix('/group');
        $this->addGet('/list',['action' => 'list']);
        $this->add('/detail/{group_code:[a-zA-Z0-9_\-]+}',['action' => 'detail']);
        $this->add('/edit/{group_code:[a-zA-Z0-9_\-]+}',['action'=>'edit']);
    }
}